﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MemberLayout.master" AutoEventWireup="true" CodeBehind="MyPost.aspx.cs" Inherits="ChatForum.Client.MyPost" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" runat="server">
	<div id="newPostDiv">
		<table>
			<tr>
				<td rowspan="2"><asp:TextBox style="resize: none;" runat="server" TextMode="MultiLine" ID="txtNewPost" Height="100%" Width="500px"></asp:TextBox></td>
                <asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" ControlToValidate="txtNewPost" 
                ErrorMessage="Enter Content" ForeColor="Red"></asp:requiredfieldvalidator>
				<td><asp:DropDownList runat="server" ID="categoryDD"></asp:DropDownList></td>
			</tr>
			<tr>
				<td><asp:Button Text="Add" OnClick="OnCreatePost" runat="server" /></td>
			</tr>
		</table>
	</div>
	<div id="postListDiv">
		<asp:ListView ID="myPostList" runat="server">
			<ItemTemplate>
				<div class="singleMyPostClass">
					<table >
						<tr class="myPostHeaderStyle borderStyle">
							<td>
								<asp:Label ID="lblCategoryName" Text='<%#Eval("CategoryName") %>' runat="server" />
							</td>
							<td class="rightAlign">
								<asp:Label ID="lblCreateDate" Text='<%#Eval("CreateDate") %>' runat="server" />
							</td>
						</tr>
						<tr class="myPostRowStyle">
							<td colspan="2">
								<asp:TextBox Width="100%" Enabled="false" ID="txtPostDesc" Text='<%#Eval("Description") %>' runat="server" TextMode="MultiLine" />
							</td>
						</tr>
						<tr class="rightAlign">
							<td colspan="2">
								<asp:LinkButton Text="Show Thread" CausesValidation="false" PostBackUrl='<%#("~/PostThread.aspx?postId="+Eval("PostId"))%>' runat="server" />
							</td>
						</tr>
					</table>
				</div>
			</ItemTemplate>
		</asp:ListView>
	</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="scriptContent" runat="server">
</asp:Content>
